﻿@{
    ViewBag.Title = "Bảng giá";
}
<script type="text/javascript">
    $(document).ready(function () {
        new SearchHelper($("#txtSearch"), $("#btnSearch"), $("#RatesTable"));
    });
</script>
<div class="section-header">
    <div class="title">
        <img src="@Url.Content("~/Areas/Administrator/Content/Images/ico-catalog.png")" alt="" />
        Bảng giá
    </div>
    <div class="options">
    </div>
</div>
<div style="display: none;">
    @Helpers.SearchPanel(text: "Nhập vào từ khóa tìm kiếm...", btnSearch: "btnSearch", txtSearch: "txtSearch")
</div>
@(Html.Osd().Grid<Transport.Areas.Administrator.Models.RatesTableListModel>(new List<Transport.Areas.Administrator.Models.RatesTableListModel>(), name: "RatesTable", controllerName: "RatesTable")
                    .Columns(columns =>
                    {
                        columns.Bound(x => x.Description).HeaderHtmlAttributes(new { style = "text-align:center" }).Title("Trọng Lượng <br/> (Gram)")
                            .Sortable(false)
                            .Filterable(false);
                        columns.Bound(x => x.PriceColumnA).HeaderHtmlAttributes(new { style = "text-align:center" }).Title("Nội Tỉnh <br/> <b>(A)</b>")
                            .Width(150)
                            .Sortable(false)
                            .Filterable(false);
                        columns.Bound(x => x.PriceColumnB).HeaderHtmlAttributes(new { style = "height:130px;text-align:center" }).Title("TX.TD Một <br/> Tp.Biên Hòa <br/> Tp.Vũng Tàu <br/> <b>(B)</b>")
                            .Width(150)
                            .Sortable(false)
                            .Filterable(false);
                        columns.Bound(x => x.PriceColumnC).HeaderHtmlAttributes(new { style = "text-align:center" }).Title("< 300 km<br/> <b>(C)</b>")
                            .Width(150)
                            .Sortable(false)
                            .Filterable(false);
                        columns.Bound(x => x.PriceColumnD).HeaderHtmlAttributes(new { style = "text-align:center" }).Title("> 300 km<br/> <b>(D)</b>")
                            .Width(150)
                            .Sortable(false)
                            .Filterable(false);
                        columns.Bound(x => x.PriceColumnE).HeaderHtmlAttributes(new { style = "text-align:center" }).Title("Tp.Hà Nội Tp.Đà Nẵng<br/> <b>(E)</b>")
                            .Width(150)
                            .Sortable(false)
                            .Filterable(false);
                        columns.Bound(p => p.RatesTableId)
                            .ClientTemplate("<a href=\"RatesTable/Edit/<#= RatesTableId #>\"> <img src=\" ../Content/Images/edit_16_16.png\" /></a>")
                            .HtmlAttributes(new { style = "text-align:center" })
                            .Title(string.Empty)
                            .Width(70).Sortable(false)
                            .Filterable(false);
                    }))